import java.util.Scanner;

public class Test4 {
        public static void main(String [] args) {
            Scanner in=new Scanner(System.in);
            System.out.println("请输入三个数a,b,c:");
            int a=in.nextInt();
            int b=in.nextInt();
            int c=in.nextInt();
            max3(a,b,c);
            sum1(a,b);
            sum1(a,b,c);
            System.out.println("请输入5个数m,n,h,k,s");
            int m=in.nextInt();
            int n=in.nextInt();
            double h=in.nextDouble();
            double k=in.nextDouble();
            double s=in.nextDouble();
            max4(m,n);
            max4(h,k,s);
            but(3,'A','B','C');
        }
        //求最大值
        public static int max2(int a,int b){
            if(a>b){
                return a;
            }
            return b;
        }
        public static void max3(int a,int b,int c){
            int w=max2(a,b);
            if(w>c) {
                System.out.println("a,b,c最大值为"+w);
            }else{
                System.out.println("a,b,c最大值为"+c);
            }
        }
        //重载求最值
        public static void sum1(int a,int b) {
            System.out.println("两数之和为"+(a+b));
        }
        public static void sum1(int a,int b,int c){
            System.out.println("三数之和为"+(a+b+c));
        }
        public static void max4(int a,int b) {
            if(a>b){
                System.out.println("两数最大值为"+a);
        }else{
            System.out.println("两个数最大值为"+b);
    }}
    public static void max4(double a,double b,double c){
            double max=a;
            if(max<b){
                max=b;
                if(max<c){
                    max=c;
                }
            }
        if(max<c){
            max=c;
            if(max<b){
                max=b;
            }
        }
        System.out.println("三个小数最大值为"+max);
    }
    //汉洛塔
        public static void but(int n,char a,char b,char c) {
            if (n == 1) {
                System.out.println("移动盘子1从" + a + "到" + c);
                return ;
            }
            but(n - 1, a, c, b);
            System.out.println("移动盘子" + n + "从" + a + "到" + c);
            but(n - 1, b, a, c);
        }


    }


